package com.itheima.dao;

import com.itheima.domain.Account;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 王加鑫
 * @Date 2021/08/04 16:27
 * @Since JDK 1.8
 */
public interface AccountDao {

    /*    @Select("insert into account values(null,#{name},#{age})")*/
    void save(Account account);

    /*    @Update("update account set name = #{name},age = #{age} where id = #{id}")*/
    void update(Account account);

    /*    @Delete("delete from account where id = #{id}")*/
    void delete(Integer id);

    /*    @Select("select * from account where id = #{id}")*/
    Account findById(Integer id);

    /*    @Select("select * from account")*/
    List<Account> findAll();

    //支付
    void payment(@Param("money") Double money, @Param("id") Integer id);

    //收款
    void collection(@Param("money") Double money, @Param("id") Integer id);


    
}
